[v6r20] Space token usage#3611
Merged
atsareg merged 1 commit intoFeb 19, 2018
Merged
Conversation
acd2493 to
3effa58
Compare
fstagni
reviewed
Feb 6, 2018
| spaceTokenAttr = 'spacetoken.description?%s' % self.protocolParameters['SpaceToken'] | ||
| # gfal2 can take any srm url as a base. | ||
| spaceTokenEndpoint = self.getURLBase()['Value'] | ||
| print "%s %s" % (spaceTokenEndpoint, spaceTokenAttr) |
|
|
||
| TODO: needs gfal2.15 because of bugs: | ||
| https://its.cern.ch/jira/browse/DMC-979 | ||
| https://its.cern.ch/jira/browse/DMC-977 |
Contributor
There was a problem hiding this comment.
Aren't you already "going around" these 2 bugs in the lines below?
|
|
||
| except (gfal2.GError, ValueError) as e: | ||
| errStr = 'Something went wrong while checking for spacetoken occupancy.' | ||
| self.log.verbose(errStr, e.message) |
Contributor
Author
There was a problem hiding this comment.
I'd say verbose, because the error is returned to the StorageElement which will try another plugin
3effa58 to
df639af
Compare
fstagni
previously approved these changes
Feb 7, 2018
Contributor
Author
|
Wait do not merge ! Something came up from IT, I have to correct a few things |
Contributor
|
news from IT? |
Contributor
Author
|
Yes, I still have to implement it. I try asap. |
…rages and use it in RSS
df639af to
2bb2024
Compare
Contributor
Author
|
Corrected |
Contributor
|
You updated a single commit... what have been the latest changes? |
Contributor
Author
|
Just added the WSUrl in the call to get the space token in order not to go to the BDII |
fstagni
approved these changes
Feb 14, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #3601
Sorry @fstagni I lost your commits when doing the rebase, they are all squashed in a diff now.
It contains a real implementation of the getOccupancy for the StorageElement, as well as an implementation for GFAL2_SRM2.
Note that the version of gfal2 we use at the moment has bugs (see comments) that will be fixed in 2.15. For the time being, I wrote workarounds.
BEGINRELEASENOTES
*Core
NEW: utility to convert file sizes between different unit
*Resources
NEW: Added StorageElement.getOccupancy() method for DIP and GFAL2_SMR2 SE types
*RSS
CHANGE: Using StorageElement.getOccupancy()
ENDRELEASENOTES